{# Heredando la plantilla principal #}

{% extends 'default.html' %}
{% use 'navegacion.html' %}
{% use 'loginUsuario.html' %}

{% block contenidos %}
<section style="margin-top:50px">
	<div class="hero-unit">
		<h1>Importacion de Empleados</h1>
	</div>
	<div class="hero-unit">
			<legend>Subida de archivo</legend>
			<form class="subidaArcEmp" id="subidaArcEmp" action="subidaArcEmp.php" method="post" enctype="multipart/form-data">
				<p>
				<span></span>
				<input type="file" name="archivo" class="{required:true}" />
				</p>
				<p>
				<button id="subir" name="subir" type="submit" class="btn btn-primary">Subir Archivo</button>
				</p>
			</form>
	</div>
</section>

{% endblock %}

{% block javaScripts %}
	<script type="text/javascript" src="lib/js/jquery-validation-1.10.0/jquery.metadata.js"></script>
	<script type="text/javascript" src="lib/js/jquery-validation-1.10.0/jquery.validate.min.js"></script>
	<script type="text/javascript" src="lib/js/jquery-validation-1.10.0/localization/messages_es.js"></script>
	<script type="text/javascript" src="lib/js/funcionControl.js"></script>
	<script>
		
		$(function(){
			//Valido el formulario de edicion de empresa
			$('#subidaArcEmp').validate({
				submitHandler: function(){
					form.submit();  
				},
				errorPlacement: function(error, element){
					error.appendTo(element.prev("span").append());
				}
			});
		});
	</script>
{% endblock %}	